# Contributor: Bart Ribbers <bribbers@disroot.org>
# Maintainer: Bart Ribbers <bribbers@disroot.org>
pkgname=kconfig
pkgver=5.95.0
pkgrel=0
pkgdesc="Configuration system"
arch="all !armhf" # armhf blocked by extra-cmake-modules
url="https://community.kde.org/Frameworks"
license="LGPL-2.0-or-later AND LGPL-2.0-only AND LGPL-2.1-or-later"
makedepends="
	doxygen
	extra-cmake-modules
	graphviz
	qt5-qtdeclarative-dev
	qt5-qttools-dev
	samurai
	"
checkdepends="xvfb-run"
source="https://download.kde.org/stable/frameworks/${pkgver%.*}/kconfig-$pkgver.tar.xz"
subpackages="$pkgname-dev $pkgname-doc $pkgname-lang"

build() {
	cmake -B build -G Ninja \
		-DCMAKE_BUILD_TYPE=RelWithDebInfo \
		-DCMAKE_INSTALL_PREFIX=/usr \
		-DCMAKE_INSTALL_LIBDIR=lib \
		-DBUILD_QCH=ON
	cmake --build build
}

check() {
	cd build

	CTEST_OUTPUT_ON_FAILURE=TRUE xvfb-run ctest -E 'kconfig(core-(kconfig|kdesktopfile)|gui-kstandardshortcutwatcher)test'
}

package() {
	DESTDIR="$pkgdir" cmake --install build
}

sha512sums="
9e7e7895aa4007dc21dae69802521a19e65692ec4f2faf8a1925d176791bc3b9dea07eedd983c4f846b82d3f38cc82540481af34795ddc4523ae5e13cef283bb  kconfig-5.95.0.tar.xz
"
